The present invention relates to devices and methods for writing data using a buffer which reduces tape medium backhitches. Specifically, this invention relates to accumulating data sent from a higher order device to a buffer, and in response to a command sent from the higher order device, writing, the data accumulated in the buffer to the tape medium.
With a tape drive that writes data to a tape medium, the following process typically occurs: accumulate the data in a buffer, and then write the data to the tape medium from the buffer with timing that is convenient for the drive. In order to assure that all of the data sent to the drive will be written to the tape medium, the host sends to the drive a command (Write FM Non Immediate command) to forcibly write the data. Such forced writing from the buffer to the tape medium is called “synchronization.”
Incidentally, if the tape medium is not stopped after synchronization has been performed, a gap will form on the tape medium between the data written lot the prior synchronization and the data written for the subsequent synchronization. The result is that a region of the tape medium becomes wasted. This necessitates performing a backhitch. Backhitching, is a series of operations defined by decelerating and stopping the forward speed of the tape medium, sending the tape medium in the reverse direction, thereafter attaining the position for writing again by sending the tape medium in the original direction, and then writing the next data. The next data cannot be written until this backhitch is completed. Because the backhitch requires approximately 2-3 seconds of time, performing a backhitch has a large impact on performance.
As technology for avoiding the described condition, there has been offered recursive accumulating backhitchless flush (RABF), as described in more detail in U.S. Pat. No. 6,856,479, for example. RABF is as method for writing a transaction (data to be written during synchronization) to a magnetic tape without performing backhitch by having the tape drive accumulate the transaction in a buffer and thereafter performing recursive consecutive writing of the transaction from the buffer to the magnetic tape. With RABF, the backhitch is not performed except when recursively writing accumulated transactions to the tape drive, and therefore performance and capacity are maximized by the ability to place transactions to be recursively written in continuation of preceding data.
When the transaction size (volume of data to be written during, synchronization) is small, the RABF method improves synchronization performance. But when the transaction size reaches a certain amount, the overhead operations increase for temporarily writing to a different location, and thereafter writing with recursion.
As a method for improving synchronization performance when the transaction size is large, there has been offered, the same wrap backhitchless flush method (SWBF) described in more detail in U.S. Pat. No. 7,903,363, for example. SWBF is a method for writing without backhitch, that is, without stopping the tape medium or moving it in the reverse direction, thereby imparting no adverse impact on the nominal capacity of the tape medium memory capacity.
The RABF method is effective technology when the transaction size is small, and the SWBF method is effective technology when the transaction size is large. Accordingly, in a tape drive, RABF may be used if the transaction size does not exceed a threshold and SWBF may be used if the transaction size does exceed the threshold.
However, in situations where the transaction size is comparatively large even though within a size wherein RABF is efficient, there is an increase in the number of times for temporarily writing data to a different place and then re-writing it to the originally intended place (the RABF cycle count), and performance drops due to the operational overhead. Due to this, a method of improving performance by reducing the number of RABF cycles would be beneficial.